//---------------------------------------------------------------------------
//
// Name:        TicTacToe.cpp
// Author:      Retral
// Created:     6/7/2007 3:57:59 PM
// Description: TicTacToe class implementation
//
//---------------------------------------------------------------------------

#include "TicTacToe.h"

//Do not add custom headers between
//Header Include Start and Header Include End
//wxDev-C++ designer will remove them
////Header Include Start
////Header Include End

//----------------------------------------------------------------------------
// TicTacToe
//----------------------------------------------------------------------------
//Add Custom Events only in the appropriate block.
//Code added in other places will be removed by wxDev-C++
////Event Table Start
BEGIN_EVENT_TABLE(TicTacToe,wxFrame)
	////Manual Code Start
	////Manual Code End

	EVT_CLOSE(TicTacToe::OnClose)
	EVT_BUTTON(ID_WXBUTTON9,TicTacToe::WxButton9Click)
	EVT_BUTTON(ID_WXBUTTON8,TicTacToe::WxButton8Click)
	EVT_BUTTON(ID_WXBUTTON7,TicTacToe::WxButton7Click)
	EVT_BUTTON(ID_WXBUTTON6,TicTacToe::WxButton6Click)
	EVT_BUTTON(ID_WXBUTTON5,TicTacToe::WxButton5Click)
	EVT_BUTTON(ID_WXBUTTON4,TicTacToe::WxButton4Click)
	EVT_BUTTON(ID_WXBUTTON3,TicTacToe::WxButton3Click)
	EVT_BUTTON(ID_WXBUTTON2,TicTacToe::WxButton2Click)
	EVT_BUTTON(ID_WXBUTTON1,TicTacToe::WxButton1Click)
END_EVENT_TABLE()
////Event Table End

TicTacToe::TicTacToe(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
: wxFrame(parent, id, title, position, size, style)
{
	CreateGUIControls();
}

TicTacToe::~TicTacToe()
{
}

void TicTacToe::CreateGUIControls()
{
	//Do not add custom code between
	//GUI Items Creation Start and GUI Items Creation End
	//wxDev-C++ designer will remove them.
	//Add the custom code before or after the blocks
	////GUI Items Creation Start

	SetTitle(wxT("Tic-Tac-Toe"));
	SetIcon(wxNullIcon);
	SetSize(8,8,308,327);
	Center();


	WxButton9 = new wxButton(this, ID_WXBUTTON9, wxT(""), wxPoint(200,200), wxSize(100,100), 0, wxDefaultValidator, wxT("WxButton9"));
	WxButton9->SetFont(wxFont(72, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));

	WxButton8 = new wxButton(this, ID_WXBUTTON8, wxT(""), wxPoint(100,200), wxSize(100,100), 0, wxDefaultValidator, wxT("WxButton8"));
	WxButton8->SetFont(wxFont(72, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));

	WxButton7 = new wxButton(this, ID_WXBUTTON7, wxT(""), wxPoint(0,200), wxSize(100,100), 0, wxDefaultValidator, wxT("WxButton7"));
	WxButton7->SetFont(wxFont(72, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));

	WxButton6 = new wxButton(this, ID_WXBUTTON6, wxT(""), wxPoint(200,100), wxSize(100,100), 0, wxDefaultValidator, wxT("WxButton6"));
	WxButton6->SetFont(wxFont(72, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));

	WxButton5 = new wxButton(this, ID_WXBUTTON5, wxT(""), wxPoint(100,100), wxSize(100,100), 0, wxDefaultValidator, wxT("WxButton5"));
	WxButton5->SetFont(wxFont(72, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));

	WxButton4 = new wxButton(this, ID_WXBUTTON4, wxT(""), wxPoint(0,100), wxSize(100,100), 0, wxDefaultValidator, wxT("WxButton4"));
	WxButton4->SetFont(wxFont(72, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));

	WxButton3 = new wxButton(this, ID_WXBUTTON3, wxT(""), wxPoint(200,0), wxSize(100,100), 0, wxDefaultValidator, wxT("WxButton3"));
	WxButton3->SetFont(wxFont(72, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));

	WxButton2 = new wxButton(this, ID_WXBUTTON2, wxT(""), wxPoint(100,0), wxSize(100,100), 0, wxDefaultValidator, wxT("WxButton2"));
	WxButton2->SetFont(wxFont(72, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));

	WxButton1 = new wxButton(this, ID_WXBUTTON1, wxT(""), wxPoint(0,0), wxSize(100,100), 0, wxDefaultValidator, wxT("WxButton1"));
	WxButton1->SetFont(wxFont(72, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
	////GUI Items Creation End
}

void TicTacToe::OnClose(wxCloseEvent& event)
{
	Destroy();
}

/*
 * WxButton1Click
 */
void TicTacToe::WxButton1Click(wxCommandEvent& event)
{
	WxButton1->SetLabel(wxString('X', (size_t)1));
}

/*
 * WxButton2Click
 */
void TicTacToe::WxButton2Click(wxCommandEvent& event)
{
	WxButton2->SetLabel(wxString('X', (size_t)1));
}

/*
 * WxButton3Click
 */
void TicTacToe::WxButton3Click(wxCommandEvent& event)
{
	WxButton3->SetLabel(wxString('X', (size_t)1));
}

/*
 * WxButton4Click
 */
void TicTacToe::WxButton4Click(wxCommandEvent& event)
{
	WxButton4->SetLabel(wxString('X', (size_t)1));
}

/*
 * WxButton5Click
 */
void TicTacToe::WxButton5Click(wxCommandEvent& event)
{
	WxButton5->SetLabel(wxString('X', (size_t)1));
}

/*
 * WxButton6Click
 */
void TicTacToe::WxButton6Click(wxCommandEvent& event)
{
	WxButton6->SetLabel(wxString('X', (size_t)1));
}

/*
 * WxButton7Click
 */
void TicTacToe::WxButton7Click(wxCommandEvent& event)
{
	WxButton7->SetLabel(wxString('X', (size_t)1));
}

/*
 * WxButton8Click
 */
void TicTacToe::WxButton8Click(wxCommandEvent& event)
{
	WxButton8->SetLabel(wxString('X', (size_t)1));
}

/*
 * WxButton9Click
 */
void TicTacToe::WxButton9Click(wxCommandEvent& event)
{
	WxButton9->SetLabel(wxString('X', (size_t)1));
}
